// JS 是一个表现力极强的语言
const xkl ={
    name : '肖凯浪',
    sex : '男',
    hasGirlFriend: true,
    hometown:'宜春',
    room :'研一'
}
xkl.sex=1;
console.log(typeof xkl);
console.log(xkl.sex);
// 传统，保守一点
const children=[];
class Person{
    constructor(name,sex) {
        this.name =name;
        this.sex =sex;
        if(children.length>=2)
            console.log('感谢您为国家做的贡献');
    }
}
const hai1=new Person('肖大郎');
children.push(hai1);
const hai2=new Person('肖飞');
children.push(hai2);
const hai3=new Person('肖站');
children.push(hai3);
console.log(children);

const ele = document.getElementById('user');
// const txtEle =document.createElement('div');
ele.innerHTML=`
<div>姓名：${xkl.name}</div>
<div>家乡：${xkl.hometown}</div>
`